The present application relates generally to an improved data processing apparatus and method and more specifically to mechanisms for capturing device state during operating system dump operations.
Operating systems are comprised of many distinct components. Some of these components, e.g., device drivers, are responsible for managing devices attached to the host system, e.g., storage device disk volumes, ports of a network adapter, or the like. In some instances, multiple components, e.g., multiple device drivers, share management of a common device, e.g., an Ethernet device driver and a Fibre Channel device driver may both manage a network adapter such that both Ethernet and Fibre Channel communications through the ports of the network adapter are made possible. For example, a network adapter card may have multiple ports, each port being managed by a separate operating system (OS) component, or a device may provide multiple functions (using the Peripheral Component Interconnect (PCI) standard definition of a function), each managed by a distinct OS component.
When an operating system abnormally terminates, such as when there is a system crash or other critical error due to various factors including overflow write operations, hang conditions, race conditions, or the like, a data collection mechanism is invoked to preserve an image of the operating system state for later analysis, such as by performing a system or memory dump. The “dump” contains the contents of the state registers, system memory, and the like, which are “dumped” into one or more data structures for storage and later analysis.
This data collection is done by having a “dump manager” component, which is part of the OS, contact each of the other components, e.g., device drivers, which are referred to as the dump collectors. The dump manager requests each dump collector to gather and identify data to be included in the dump with the order in which these requests being made and their concurrency being indeterminate. The dump manager writes the collected data from the dump collectors to an external storage device by issuing Input/Output (IO) requests to a family of dump writer components, e.g., components managing a dump disk and a storage adapter or network adapter port through which the external storage device is accessed.